﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Grid
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        int squareSize = 30;
        int numOfColumnsandRows = 200;
        public MainWindow()
        {
            InitializeComponent();

            un.Rows = numOfColumnsandRows;
            un.Columns = numOfColumnsandRows;
            for (int i = 0; i < numOfColumnsandRows; i++)
            {
                for (int j = 0; j < numOfColumnsandRows; j++)
                {
                    Rectangle b = new Rectangle();
                    b.Fill = Brushes.Red;
                    b.MouseUp += (x, y) => b.Fill = Brushes.White;
                    b.Width = squareSize;
                    b.Height = squareSize;
                    un.Children.Add(b);
                    GardenCube g = new GardenCube();
                    
                }
            }

        }

    }
}
